package com.aaa.controller.tables;

import com.aaa.dao.MenuMapper;
import com.aaa.entity.Menu;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("menu")
public class MenuController {
    @Resource
    MenuMapper menuMapper;
    @RequestMapping("select")
    public Object select(){
        return menuMapper.selectList(null);
    }
    @RequestMapping("insert")
    public Integer insert(Menu menu){
        return menuMapper.insert(menu);
    }
    @RequestMapping("update")
    public Integer update(Menu menu){
        return menuMapper.updateById(menu);
    }
    @RequestMapping("delete")
    public Integer delete(Integer mid){
        return menuMapper.deleteById(mid);
    }
}
